package model;

import java.util.Set;

public class Department {

	public static class DepartmentBuilder {

		private String name;
		private Employee manager;

		public DepartmentBuilder name(String name) {
			this.name = name;
			return this;
		}

		public DepartmentBuilder manager(Employee manager) {
			this.manager = manager;
			return this;
		}

		public Department build() {
			return new Department(this);
		}

	}

	private int version;
	private int departmentId;
	private String name;
	private Employee manager;
	private Set<Employee> employees;

	private Department(DepartmentBuilder builder) {
		name = builder.name;
		manager = builder.manager;
	}

	public int getVersion() {
		return version;
	}

	public int getDepartmentId() {
		return departmentId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Employee getManager() {
		return manager;
	}

	public void setManager(Employee manager) {
		this.manager = manager;
	}

	public Set<Employee> getEmployees() {
		return employees;
	}

}
